package modelsni

import "gorm.io/gorm"

type Tool struct {
	gorm.Model
	Name    string  `gorm:"type:varchar(50); not null" json:"name"`
	Price   float64 `gorm:"type:decimal(10,2);not null" json:"price"`
	Num     int     `gorm:"type:int(11);not null" json:"num"`
	Img     string  `gorm:"type:varchar(255)" json:"img"`
	Info    string  `gorm:"type:varchar(255)" json:"info"`
	ClassId int     `gorm:"type:int(11)" json:"class_id"`
	BrandId int     `gorm:"type:int(11)" json:"brand_id"`
}
type Class struct {
	gorm.Model
	Name string `gorm:"type:varchar(30)" json:"name"`
}
type Brand struct {
	gorm.Model
	Name string `gorm:"type:varchar(30)" json:"name"`
}
type ToolData struct {
	Tool
	ClassName string
	BrandName string
}
